The present invention relates to database management systems, and more specifically, to database management systems comprising stored procedures.
Managing large data volumes and OLTP (online transactional processing) as well as OLAP (online analytical processing) queries that are performed on data volumes has become a major factor for data warehouse design. Often, OLTP queries perform better on database tables of a particular structure that may be unsuited for efficiently performing OLAP queries and vice versa. To overcome the problems associated with different kinds of database queries requiring different data structures, systems have been developed which comprise two or more database management systems (DMBSs) with differently structured database tables. The data of one of the databases is—partially or completely—synchronized with the data of the one or more other databases of the system.
In the above mentioned systems, there may exist queries which can be performed more quickly on the source DBMS while other queries can be performed more quickly on one of the other DBMSs of the system. Some of the queries may be implemented as stored procedures of the source DBMS while other queries may be implemented as stored procedures in one of the other DBMSs. A problem associated with this situation that a client may need to “know” in which one of the DBMSs a particular query has the minimum execution time in order to direct the query to the appropriate DBMS or may need to “know” in which one of the DBMSs of the system a respective stored procedure is implemented for calling the stored procedure. This may lead to a tight coupling of client and database server and thus to a significantly increased maintenance costs.
Dynamically dispatching a query from one DBMS of the system to the other is often not possible due to the complexity of the query and due to significant deviations in respect to the table structure and database-internal functions of the two different DBMSs.